﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;

namespace SystemAnalizer.Common
{
    public class CommonString
    {
        private static string culturestr;
        private static ResourceDictionary message_res_dict = new ResourceDictionary();
        public static string CultureStr
        {
            set
            {
                SetSource(value);
            }
            get
            {
                return culturestr;
            }
        }

        private static void SetSource(string culstr)
        {
            culturestr = culstr;
            switch (culturestr)
            {
                case "en-US":
                    message_res_dict.Source = new Uri("..\\Resources\\MessageResources.xaml", UriKind.Relative);
                    break;
                case "hy-AM":
                    message_res_dict.Source = new Uri("..\\Resources\\MessageResources.hy-AM.xaml", UriKind.Relative);
                    break;
                default:
                    message_res_dict.Source = new Uri("..\\Resources\\StringResources.xaml", UriKind.Relative);
                    break;
            }
        }

        static CommonString()
        {
            if (culturestr == null)
                SetSource("hy-AM");
        }
        
       // Insert valid integer
       public static string Insert_Valid_integer
       {
          get { return (string)message_res_dict["INSERT_VALID_INTEGER_MSG"]; }         
       }

       public static string Error_in_settings_file
       {
           get { return (string)message_res_dict["ERROR_IN_SETTINGS_FILE_MSG"]; }
       }

       public static string Settings_file_not_found
       {
           get { return (string)message_res_dict["SETTINGS_FILE_NOT_FOUND_MSG"]; }
       }

       public static string Cant_write_in_settings_file
       {
           get { return (string)message_res_dict["CANT_WRITE_IN_SETTINGS_FILE_MSG"]; }
       }
    
    }
}
